//
//  FLLForthSectionHeaderView.m
//  FLLGodOfCookery
//
//  Created by LL.F on 16/9/1.
//  Copyright © 2016年 LL.F. All rights reserved.
//

#import "FLLForthSectionHeaderView.h"
#import "Masonry.h"

@implementation FLLForthSectionHeaderView
- (instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier
{
    
    self = [super initWithReuseIdentifier:reuseIdentifier];
    if ( self) {
        [self createSubViews];
    }
    return self;
}
- (void)createSubViews
{
    
    self.titleLabel = [[UILabel alloc] init];
    _titleLabel.text = @"区头";
    [self addSubview:_titleLabel];
    
    self.moreButton = [UIButton buttonWithType:UIButtonTypeSystem];
    [_moreButton setImage:[[UIImage imageNamed:@"more_icon"] imageWithRenderingMode:1]forState:UIControlStateNormal];
    [self addSubview:_moreButton];
    
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    [_titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(5);
        make.bottom.mas_equalTo(0);
        make.centerX.mas_equalTo(0);
    }];

 
    [_moreButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.width.height.mas_equalTo(20);
        make.left.mas_equalTo(_titleLabel.mas_right).mas_offset(20);
        make.top.mas_equalTo(0).mas_equalTo(20);
    }];
}


/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
